1 /* 2 * The MIT License (MIT) 3 * 4 * Copyright (c) 2014 Devisualization (Richard Andrew Cattermole) 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights 9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 * copies of the Software, and to permit persons to whom the Software is 11 * furnished to do so, subject to the following conditions: 12 * 13 * The above copyright notice and this permission notice shall be included in all 14 * copies or substantial portions of the Software. 15 * 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 * SOFTWARE. 23 */ 24 module devisualization.util.opengl.function_wrappers.v14; 25 import gl = derelict.opengl3.gl; 26 public import devisualization.util.opengl.function_wrappers.v10 : BlendFactors; 27 public import devisualization.util.opengl.function_wrappers.v11 : Primitives; 28 29 enum PointParamaterNames { 30 FadeThresholdSize = gl.GL_POINT_FADE_THRESHOLD_SIZE, 31 SpriteCoordOrigin = gl.GL_POINT_SPRITE_COORD_ORIGIN 32 } 33 34 void glBlendFuncSeparate(BlendFactors srcRGB, BlendFactors dstRGB, BlendFactors srcAlpha, BlendFactors dstAlpha) { 35 gl.glBlendFuncSeparate(cast(gl.GLenum)srcRGB, cast(gl.GLenum)dstRGB, cast(gl.GLenum)srcAlpha, cast(gl.GLenum)dstAlpha); 36 } 37 38 void glMultiDrawArrays(Primitives mode, int[] first, int[] count) 39 in { 40 assert(first.length == count.length); 41 } body { 42 gl.glMultiDrawArrays(cast(gl.GLenum)mode, first.ptr, count.ptr, cast(uint)first.length); 43 } 44 45 void glMultiDrawElements(Primitives mode, int[] count, ubyte[] indices) { 46 gl.glMultiDrawElements(cast(gl.GLenum)mode, count.ptr, gl.GL_UNSIGNED_BYTE, indices.ptr, cast(uint)indices.length); 47 } 48 49 void glMultiDrawElements(Primitives mode, int[] count, ushort[] indices) { 50 gl.glMultiDrawElements(cast(gl.GLenum)mode, count.ptr, gl.GL_UNSIGNED_SHORT, indices.ptr, cast(uint)indices.length); 51 } 52 53 void glMultiDrawElements(Primitives mode, int[] count, uint[] indices) { 54 gl.glMultiDrawElements(cast(gl.GLenum)mode, count.ptr, gl.GL_UNSIGNED_INT, indices.ptr, cast(uint)indices.length); 55 } 56 57 void glPointParameterf(PointParamaterNames pname, float param) { 58 gl.glPointParameterf(cast(gl.GLenum)pname, param); 59 } 60 61 void glPointParameterfv(PointParamaterNames pname, float[] params) { 62 gl.glPointParameterfv(cast(gl.GLenum)pname, params.ptr); 63 } 64 65 void glPointParameteri(PointParamaterNames pname, int param) { 66 gl.glPointParameterf(cast(gl.GLenum)pname, param); 67 } 68 69 void glPointParameteriv(PointParamaterNames pname, int[] params) { 70 gl.glPointParameteriv(cast(gl.GLenum)pname, params.ptr); 71 }